]>
Commit | Line | Data |
---|---|---|
56968557 P |
1 | # Solving partial differential equations by descretizing space |
2 | # This is an adoption of the application note “alpaca_23” from Anabrid [https://analogparadigm.com/downloads/alpaca_23.pdf] | |
3 | # THAT only has 5 integrators, thus we have to reduce the number of elements | |
4 | # | |
5 | # u_0 = delta_t | |
6 | # u''_1 = u_0 - 2*u_1 + u_2 | |
7 | # u''_2 = u_1 - 2*u_2 + u_3 | |
8 | # u_3 = 0 | |
9 | ||
10 | coefficient(1): f1 # fix to 0.2 to get 2 for the integration | |
11 | coefficient(2): f2 # fix to 0.2 to get 2 for the integration | |
12 | coefficient(5): 1 -> delta_t | |
13 | u_0 = delta_t | |
14 | coefficient(6): 0 -> u_3 | |
15 | ||
16 | iintegrate u_0, 10*:-f1u_1, u_2 -> -u'_1 # input is u''_1 | |
17 | iintegrate -u'_1 -> u_1 | |
18 | invert u_1 -> -u_1 | |
19 | -u_1 * f1 -> -f1u_1 | |
20 | ||
21 | iintegrate u_1, 10*:-f2u_2, u_3 -> -u'_2 # input is u''_2 | |
22 | iintegrate -u'_2 -> u_2 | |
23 | invert u_2 -> -u_2 | |
24 | -u_2 * f2 -> -f2u_2 | |
25 | ||
26 | output(x): u_1 | |
27 | output(y): u_2 |